enum MediaType {
  Movies(name: "电影", type: "movies"),
  Tvshows(name: "剧集", type: "tvshows"),
  Mixed(name: "视频", type: "mixed"),
  Music(name: "音乐", type: "music"),
  Photo(name: "相册", type: "photo");

  const MediaType({required this.name, required this.type});
  final String name;
  final String type;

  static MediaType getMediaByType(String type) => MediaType.values.firstWhere((media) => media.type == type);
}